﻿#ifndef ITSERVICE_H
#define ITSERVICE_H

#include "commdef.h"
#include "tobject.h"

#define WM_EXE_INVOKE 10000

//struct TTmMsg
//{
//    unsigned long ulMsg;
//    TArgs*  wParam;
//    TArgs*  lParam;
//};
//typedef std::list<TTmMsg*>  TTmMsgList;

class TArgs;
class ITFramework;
class ITService : public QObject
{
public:
    ITService(){}
    virtual ~ITService(){}
    virtual TRESULT Init() TPURE;
    virtual TRESULT UnInit(int nTime=1000) TPURE;
    virtual TRESULT CreateTask(TArgs** ppTask,long lInArgsSize,long lOutArgsSize) TPURE;
    virtual TRESULT AddTask(TArgs* pTask,int nTask = WM_EXE_INVOKE) TPURE;
    virtual TRESULT PostThreadMsg(unsigned long ulMsg,void* wParam,void* lParam) TPURE;
    virtual TRESULT SetFramework(ITFramework* pFrm) TPURE;
};

#endif // ITSERVICE_H
